<template>
  <div>
    <group v-if="userInfo">
      <cell title="姓名" :value="userInfo.name"></cell>
      <cell title="性别" :value="userInfo.sex"></cell>
      <cell title="身份证" :value="userInfo.card_number"></cell>
      <cell title="电话" :value="userInfo.mobile"></cell>
      <cell title="单位" :value="userInfo.work_unit"></cell>
      <cell title="学员通过率" :value="''"></cell>
      <cell title="学员评价" :value="''"></cell>
      <cell title="当前级别" :value="userInfo.old_work_level"></cell>
      <cell title="本次报考级别" :value="userInfo.work_level"></cell>
    </group>
  </div>
</template>

<script>
import { Cell, Group } from "vux";
import { mapState } from 'vuex'

export default {
  name: "UserCenter",
  components: {
    Group,
    Cell
  },
  computed: {
    ...mapState({
      userInfo: state => state.user.userInfo
    })
  },
  created(){
    this.$store.dispatch('getUserInfo').then(res => {
    }).catch(err => {
        console.log('userCenter page' + err)
    })
  },
  data() {
    return {
    }
  }
};
</script>

<style scoped>

</style>